import request from '@/utils/request'

const api = {
    qbgl: '/qbgl'
}

export function getInfo(unid) {
    return request({
        url: api.qbgl + '/' + unid,
        method: 'get'
    })
}

export function getQbglList(parameter) {
    return request({
        url: api.qbgl + '/list',
        method: 'get',
        params: parameter
    })
}

export function saveQbgl(parameter) {
    return request({
        url: api.qbgl,
        method: 'post',
        data: parameter,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
}

export function delQbgl(parameter) {
    return request({
        url: api.qbgl,
        method: 'Delete',
        params: parameter
    })
}

export function base64flowimage1(businessKey) {
    return request({
        url: api.qbgl + '/base64flowimage/' + businessKey,
        method: 'get'
    })
}

export function base64flowimage(unid) {
    return request({
        url: "/flow/structure/info",
        method: 'get',
        params: { unid: "1366370733252423681" }
    })
}
export function base64flowimage2(unid) {
    return request({
        //url: "/grbg/searchTotal",
        url: "/portal/searchTotal",
        method: 'get',
        params: unid
    })
}
export function base64flowimage3(unid) {
    return request({
        //url: "/grbg/searchWithModule",
        url: "/portal/searchWithModule",
        method: 'get',
        params: unid
    })
}
export function getSendFlowNode(unid) {
    return request({
        url: api.qbgl + '/getSendFlowNode?unid=' + unid,
        method: 'get'
    })
}

export function qbglSendDoc(urlparameter) {
    return request({
        url: '/flow/func/sendDoc',
        method: 'get',
        params: urlparameter,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
}

export function getCallbackNode(unid) {
    return request({
        url: api.qbgl + '/getCallbackNode/' + unid,
        method: 'get'
    })
}

export function callbackDoc(urlparameter, dataparams) {
    return request({
        url: api.qbgl + '/callbackDoc',
        method: 'post',
        data: dataparams,
        params: urlparameter,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        }
    })
}

export const qbglExport = api.qbgl + '/export'